<%@ taglib uri="/WEB-INF/myfaces_html.tld" 	prefix="h" %>
<%@ taglib uri="/WEB-INF/myfaces_core.tld" 	prefix="f" %>
<%@ taglib uri="/WEB-INF/tomahawk.tld"     	prefix="t" %>
<%@ taglib uri="/WEB-INF/myfaces_sandbox.tld"   prefix="s" %>

<%@ page import="java.util.Date" %>
<%@ page import="it.azienda.moretti.modello.BeanUtente" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="javax.faces.context.FacesContext" %>

<%
    BeanUtente login = (BeanUtente) session.getAttribute("login");
    FacesContext ctx = FacesContext.getCurrentInstance();

%>

<f:view >
    <jsp:include page="intestazione.jsp">
        <jsp:param name="titolo" value=":: Benvenuto ::" />
    </jsp:include>
    <jsp:include page="menu.jsp"/>
    <script language="javascript" src="./script/tabledate.js"></script>

    <table  align="center">
        <br />
        <hr />
        <br />
        <tr width="100%" bgcolor="yellow">
            <td align ="left" width="250px">
                <strong style="font-size: 10pt; color: #2858A2">Utente: <%=login.getNome().toUpperCase()%></strong>
            </td>   

            <td align ="left" width="400px">



            </td>  

            <td align ="right" width="250px">
            </td>   
        </tr>

        <tr width="100%">

            <td width="300px" align ="left">
                <div  style="overflow:scroll;  height: 400px;   wrap: off">
                    <h:form id="form" > 
                        <t:saveState value="#{beanAppPrenotazione}"/>            

                        <table class="dettaglio" style="width: 400px">
                            <tbody>

                                <tr> 
                                    <td colspan="2" align = "center"><strong>
                                            <h:outputText value="Stampa Prenotazioni"/>
                                        </strong>
                                    </td>
                                </tr>   
                                <tr>
                                    <td class="etichettaDettaglio"><strong><t:outputLabel for="linea" value="Linea" /></strong></td>
                                    <td>
                                        <h:selectOneMenu id="linea" value="#{beanStampaPrenotazioni.idLinea}"  style=" width:90%;">
                                            <f:selectItems value="#{beanStampaPrenotazioni.listaLinee}" />
                                        </h:selectOneMenu> 
                                    </td>              

                                </tr> 

                                <tr> 
                                    <td class="etichettaDettaglio"><strong><t:outputLabel for="part" value="Data" /></strong></td>
                                    <td><h:outputText value="Data di Partenza" style="font-size: 8pt"/>
                                        <br/>
                                        <t:inputDate id="dataPartenza" popupCalendar="false" size="10" styleClass="campoTesto" value="#{beanStampaPrenotazioni.dataPartenza}">
                                            <f:convertDateTime pattern="dd/MM/yyyy" type="both" timeZone="Europe/Rome"/>
                                        </t:inputDate>
                                        <h:message style="color: red" for="dataPartenza" showDetail="true" showSummary="false" />
                                    </td>
                                </tr>   
                                <tr>
                                    <td colspan="2" align="right">

                                        <h:commandLink dir="RTL" title="Stampa" action="#{dettaglioStampaPrenotazioni.stampaJasper}">
                                            <t:graphicImage url="image/bottoneStampa.png" border="0" title="StampaPDF"/>
                                        </h:commandLink>  
                                    </td>
                                </tr>

                                <tr>
                                </tr>
                            <br />  
                            <br />  


                            </tbody>
                        </table>
                    </h:form>
                </div>

            </td>

            <td align ="center" height="280px" width="380px" bgcolor="#F4F6FA" style="border: 2pt double #1A4593;" background="image/sfondo00016.gif">
                <br />
                <img src="image/welcome004.gif" alt=""/>
            </td>

            <td width="300px" align ="right">
                <div  style="overflow:scroll; height: 480px; wrap: off">
                </div>
            </td>
        </tr>      
    </table>       
    <jsp:include page="piePagina.jsp"/>
</f:view>
